﻿using System;
using System.Collections.Generic;

namespace Shuba.Business
{
    public class SPADAFile
    {
        private Shuba.Data.SPADAFile _SPADAFileInfo;

        public SPADAFile()
        {
            _SPADAFileInfo = new Shuba.Data.SPADAFile();
        }

        public List<Shuba.Model.SPADAFileInfo> GetList(string DateUpload)
        {
            return _SPADAFileInfo.GetList(DateUpload);
        }

        public Shuba.Model.SPADAFileInfo GetDateSystem()
        {
            return _SPADAFileInfo.GetDateSystem();
        }

        public int Save(Shuba.Model.SPADAFileInfo bi)
        {
            return _SPADAFileInfo.Save(bi);
        }

        public int Save2(Shuba.Model.SPADAFileInfo bi)
        {
            return _SPADAFileInfo.Save2(bi); 
        }

        public List<Shuba.Model.SPADAFileInfo> GetListApproval(string UpdateBy)
        {
            return _SPADAFileInfo.GetListApproval(UpdateBy);
        }

        public Shuba.Model.SPADAFileInfo GetApprovalByID(string id)
        {
            return _SPADAFileInfo.GetApprovalByID(id);
        }

        public void Approve(string ActType, string id, string FileNameUpload, DateTime DateFileUpload)
        {
            _SPADAFileInfo.Approve(ActType, id, FileNameUpload,DateFileUpload);
        }

        public void Reject(string id)
        {
            _SPADAFileInfo.Reject(id);
        }

        public Shuba.Model.SPADAFileInfo GetInfo(string id)
        {
            return _SPADAFileInfo.GetInfo(id);
        }

        public bool CheckIsUsedFileUpdate(DateTime dateFileUpload)
        {
            return _SPADAFileInfo.CheckIsUsedFileUpdate(dateFileUpload);
        }

        public string CalculateCheksum(string file)
        {
            return _SPADAFileInfo.CalculateCheksum(file);
        }

        public int getVersion(string version)
        {
            return _SPADAFileInfo.getVersion(version);
        }
    }
}
